home *** CD-ROM | disk | FTP | other *** search
- Path: po.CWRU.Edu!mab22
- From: mab22@po.CWRU.Edu (Michael A. Balfour)
- Newsgroups: comp.lang.c
- Subject: Re: Perfect Hash Functions
- Date: 22 Feb 1996 19:57:55 GMT
- Organization: Case Western Reserve University, Cleveland, OH (USA)
- Message-ID: <4gihs3$bnl@madeline.INS.CWRU.Edu>
- Reply-To: mab22@po.CWRU.Edu (Michael A. Balfour)
- NNTP-Posting-Host: kanga.ins.cwru.edu
-
-
- Well,
-
- it looks like I beat everybody else to answering my own question.
- However, if anybody else has needed to solve a similar problem, here's
- what I found: there is a very good paper titled "An optimal algorithm
- for generating minimal perfect hash functions" which describes how to go
- about finding the perfect hash function for a set of strings. The
- algorithm also allows you to keep the strings' hash values in the same
- order as the strings. For example, you could map the strings
- ("JAN","FEB","MAR","APR","MAY","JUN") to the integers 0-5 respectively.
-
- Pretty cool!
-
- This paper can be found at ftp.cs.uq.oz.au, and it is written by
- Zbigniew Czech, George Havas, and Bohdan Majewski. Unfortunately, it
- doesn't come with source code. :( Hope you remember your graph
- theory...
-
- Mike Balfour
-
- --
- ----------------------------------+--------------------------------
- Mike Balfour, Partner | BS/MS Graduate - ECMP
- Overload Engineering | Case Western Reserve University
- "New Ideas for a Brighter Future" | Cleveland, OH
-